package com.example.qy.mapper;

import com.example.qy.pojo.df;
import com.example.qy.pojo.sf;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DfMapper {
    @Select("select d.ysf,d.ssf,d.fj,d.sfl from df d inner join user u on u.uid=d.uid where u.username =#{u.username}")
    public List<df> select(String username);
    @Select("select * from df")
    public List<df> selectall();
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('1'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add1(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('2'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add2(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('3'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add3(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('4'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add4(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('5'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add5(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('6'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add6(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('7'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add7(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('8'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add8(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('9'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add9(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('10'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add10(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('11'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add11(df df);
    @Insert("insert into df (ysf,ssf,fj,sfl,uid) VALUES((select s.ysf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.ssf from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.sfl from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "(select s.fj from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ),\n" +
            "('12'),\n" +
            "(select s.uid from sf s inner join user u on u.uid=s.uid where u.username =#{u.username} ));")
    public void add12(df df);
    @Delete("delete from df where uid=#{uid}")
    public void delete(int uid);






}
